package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhCorporationMapper;
import com.ruoyi.xh.domain.XhCorporation;
import com.ruoyi.xh.service.IXhCorporationService;

/**
 * 市场/产品/总部Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhCorporationServiceImpl extends ServiceImpl<XhCorporationMapper,XhCorporation> implements IXhCorporationService {

    /**
     * 查询市场/产品/总部
     * 
     * @param id 市场/产品/总部主键
     * @return 市场/产品/总部
     */
    @Override
    public XhCorporation selectXhCorporationById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询市场/产品/总部列表
     * 
     * @param xhCorporation 市场/产品/总部
     * @return 市场/产品/总部
     */
    @Override
    public Page<XhCorporation> selectXhCorporationList(XhCorporation xhCorporation)
    {
        return new Page<>();
    }

    /**
     * 新增市场/产品/总部
     * 
     * @param xhCorporation 市场/产品/总部
     *
     */
    @Override
    public void insertXhCorporation(XhCorporation xhCorporation)
    {
        this.save(xhCorporation);
    }

    /**
     * 修改市场/产品/总部
     * 
     * @param xhCorporation 市场/产品/总部
     *
     */
    @Override
    public void updateXhCorporation(XhCorporation xhCorporation)
    {
        this.updateById(xhCorporation);
    }

    /**
     * 批量删除市场/产品/总部
     * 
     * @param ids 需要删除的市场/产品/总部主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhCorporationByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
